package com.yuyou.activity.group.service.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.activity.group.service.entity.ActivityGroupUser;

@Mapper
public interface ActivityGroupUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ActivityGroupUser record);

    ActivityGroupUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ActivityGroupUser record);
    
    /**
     * 根据手机号码找出正在参与活动
     * @param phone
     * @return
     */
    ActivityGroupUser findActiveGroupByPhone(@Param(value="projectCode") String projectCode,@Param(value="phone")  String phone);
    
    /**
     * 根据代码和手机查找
     * @param projectCode
     * @param phone
     * @return
     */
    ActivityGroupUser selectByCode7Phone(@Param(value="projectCode")String projectCode,@Param(value="phone")String phone);
    
    /**
     * 根据拼图ID查找
     * @param activityGroupId
     * @return
     */
    List<ActivityGroupUser> findByActGroId(Long activityGroupId);


    List<ActivityGroupUser> findNotUpdateUser();

    void updateStatusByList(@Param(value = "list") List<ActivityGroupUser> list);
}
